from PySide6.QtCore import QObject, Signal

from src.common.singleton import Singleton
from src.library.model import MusicMeta


@Singleton
class SignalBus(QObject):
    closeApp = Signal()
    resetPlayer = Signal()
    playMusic = Signal(MusicMeta)
    addMusic = Signal(MusicMeta, bool, arguments=["music", "play"])  # 添加音乐到播放列表，参数为音乐元数据和是否播放
    nextMusic = Signal()
    preMusic = Signal()
    playlistTotalChanged = Signal(int, arguments=["total"])
